/* 储存合同管理-基础设置相关请求 */

import { ajaxService } from '@/utils/request';
import {
  postElectronicseal,
  putElectronicseal,
  addElectronicseal,
  GetHisCount,
  GetHispage,
  GetUserBy,
} from '../type';

const env = import.meta.env;
let baseURL = env.VITE_CONTRACT_URL;

/* ----------------------------------- ---------------------------------------------------------------------------------------------------------*/

/* 电子签章   */

export function GetElectronicseal(data: postElectronicseal) {
  return ajaxService({
    url: '/contract/GetElecSeal',
    method: 'get',
    params: data,
    baseURL,
  });
}

// 修改印章
export function Modifyseal(data: putElectronicseal) {
  return ajaxService({
    url: '/contract/EditSealName',
    data,
    method: 'PUT',
    baseURL,
  });
}

//  查找电子印章使用人
export function findElectronicsealUser(data: GetUserBy) {
  return ajaxService({
    url: '/contract/GetUserBy',
    method: 'get',
    params: data,
    baseURL,
  });
}

// 添加电子签章
export function addElectronicseal(data: addElectronicseal) {
  return ajaxService({
    url: '/contract/ADDSeal',
    data,
    method: 'post',
    baseURL,
  });
}

// 删除电子签章
export function DeletingElectronicseal(id: number) {
  return ajaxService({
    url: '/contract/DeleteSealByID',
    method: 'delete',
    params: id,
    baseURL,
  });
}

// 添加获取印章类型
export function GetSealtype() {
  return ajaxService({
    url: '/contract/getConType',
    method: 'get',
    baseURL,
  });
}

// 添加获取印章
export function GetSealspecs() {
  return ajaxService({
    url: '/contract/GetShType',
    method: 'get',
    baseURL,
  });
}

/* ----------------------------------- ---------------------------------------------------------------------------------------------------------*/

/*   */
